package com.devinlee.designpatterns.singleton;

/**
 * 单例模式-测试
 */
public class Demo {
    public static void main(String[] args) {

        Singleton1 instance11 = Singleton1.getInstance();
        Singleton1 instance12 = Singleton1.getInstance();
        Singleton2 instance21 = Singleton2.getInstance();
        Singleton2 instance22 = Singleton2.getInstance();

        System.out.println(instance11 == instance12);
        System.out.println(instance21 == instance22);
    }
}
